﻿namespace UnityEditor
{
    using System;
    using UnityEngine;

    internal class ProjectWindow : BaseProjectWindow
    {
        public ProjectWindow()
        {
            base.m_HierarchyType = HierarchyType.Assets;
        }

        [UnityEditor.MenuItem("Assets/Create/GUI Skin", false, 0xd1)]
        private static void CreateNewGUISkin()
        {
            GUISkin dest = ScriptableObject.CreateInstance<GUISkin>();
            GUISkin builtinResource = Resources.GetBuiltinResource(typeof(GUISkin), "GameSkin/GameSkin.guiskin") as GUISkin;
            if (builtinResource != null)
            {
                EditorUtility.CopySerialized(builtinResource, dest);
            }
            else
            {
                Debug.LogError("Internal error: unable to load builtin GUIskin");
            }
            ProjectWindowUtil.CreateAsset(dest, "New GUISkin.guiskin");
        }
    }
}

